<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page import="java.lang.*, java.util.*, com.smarthome.domain.bean.ShResidence,com.smarthome.web.property.utils.UserHolder,com.smarthome.web.property.utils.WebUtil" %>
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
     <link rel="shortcut icon" href="/ico/favicon.ico">
    <link rel="stylesheet" href="/css/core/bootstrap/bootstrap.css" type="text/css"/>
    <link rel="stylesheet" href="/css/core/bootstrap/bootstrap-switch.css" type="text/css"/>
    <link rel="stylesheet" href="/css/core/Main.css" type="text/css"/>
    <title>主页</title>
</head>

<body>
<div id="body" class="">
    <!--头部-->
    <div class="header">
        <table>
            <tr>
                <td class="logo"></td>
                <td class="taskbar fl">
                    <div class="tabs-scroll scroll-left undis" id="tabs_left_scroll"></div>
                    <div class="tabs-container" id="tabs-container">
                        <!--<div class="select">-->
                        <!--<a hidefocus="hidefocus" closable="true" index="portal_5" class="tab" id="tabs_link_portal_5" href="javascript:;">主控制台</a>-->
                        <!--<a hidefocus="hidefocus" index="portal_5" class="close" href="javascript:;"></a>-->
                        <!--</div>-->
                    </div>
                    <div class="tabs-scroll scroll-right undis" id="tabs_right_scroll"></div>
                </td>
                <td class="user_info_area">
                    <table>
                        <tr>
                            <td class="user_info_menu" id="user_info_control"><img src="/images/iconfont-gerenxinxi.png" title=""/></td>
                            <td style="width:20px;">&nbsp;</td>
                            <!-- 
                             -->
                            <td class="user_info_menu" id="eastbar"><img src="/images/iconfont-caidan.png" title=""/>
                            	<audio controls="controls" height="100" width="100" style="display: none" id="message_voice">
								  <source src="/css/voice/msgvoice.mp3" id="message_voice_content" type="audio/mp3" />
								</audio>
                            </td>
                            <td style="width:30px;"></td>
                            <!--<td width="25px" class="user_info_menu"><img src="/images/iconfont-caidan.png" id="system_menu" title=""/></td>-->
                        </tr>
                    </table>
                </td>
                <td>
                <select data-options="panelHeight:'auto'" name="residence" onchange="location.href='/change?id='+this.value">
                		<%
                			if(null != UserHolder.getResidences()){
                				for(ShResidence r : UserHolder.getResidences()){
                					%>
                					<option value="<%=r.getId() %> "  <%if(r.getId().equals(UserHolder.getCurrentResidenceId())){
                						out.print("selected=\"selected\"");
                					} %> >
                						<%=r.getName() %>
                					</option>
                					<% 
                				}
                			}
                		%>
                </select>
                </td>
            </tr>
        </table>
        <div class='userInfoPanel' style="display: none;">
            <div class="userInfoShow">
                <div class="userPhoto"><img src="/images/test.png" title=""/></div>
                <div class="userNameAndState">
                    <div class="userName">
						<%=UserHolder.getUser().getLoginName() %>
						<!-- 
                        <img src="/images/online.png" class="userState"/>
                        <div class="chooseState">
                            <div id="online">在线</div>
                            <div id="busy">忙碌</div>
                            <div id="offline">离开</div>
                        </div>
						 -->
                    </div>
                    <% if(UserHolder.isSuperResidence()){
                        %>
                    	<div class="userDepartment"></div>
                        <%
                    }
                     %>
                </div>
            </div>
            <div class="functionArea">
                <div class="contorlPanelEntery" onclick="updatepwd()"><nobr>修改密码</nobr></div>
                <div class="logoutBtn" onclick="window.location.href = '/logout';"><nobr>注销</nobr></div>
            </div>
        </div>
    </div>

    <!--east 通知中心区域-->
    <div id="east" class="east">
        <ul class="nav nav-tabs">
            <li class="nav-pill active" paneltype="today">
                <a class="pill-bg" href="javascript:void(0)">消息任务</a>
            </li>
            <!-- 
            <li class="nav-pill" paneltype="msg">
                <a class="pill-bg" href="javascript:void(0)">消息</a>
            </li>
             -->
        </ul>
        <div id="east-tab" class="tab-content">
            <!--今日-->
            <div class="tab-pane pane-today active">
                <!-- 
                <div id="datetime" class="dateArea">
                    <div title="2015年8月10日" class="weather-date" id="date">
                        <span>4月29日</span>
                        星期三
                    </div>
                    <div title="农历六月二十六" id="mdate">农历六月二十六</div>
                </div>
                 -->
                <div class="mod">
                    <div class="mod-bd">
                        <ul class="calendar-list"  id="cal_list_test">
                          <!--   <li>
                                <a class="common-font" cal_type="calendar" cal_id="42" href="javascript:;">
                                    <span class="cal_content"><strong style="color:#5b99ee;">【用户注册】</strong>４栋５单元　张晓东４栋５单元　张晓东４栋５单元　张晓东４栋５单元　张晓东４栋５单元　张晓东４栋５单元　张晓东４栋５单元　张晓东</span>
                                    <span class="pull-right">08:26:14</span>
                                </a>
                            </li> -->
                        </ul>
                        <!-- 
                        <div id="caltip" class="notip" style="display: none;">今日暂无日程</div>
                         -->
                    </div>
                </div>
            </div>

            <!--消息-->
            <div class="tab-pane pane-msg">
                <div id="msg-tool" class="btn-group msg-tool">
                    <button class="btn btn-mini btn-primary" msg-panel="nocbox" type="button">
                        <span>日常事务</span>
                    </button>
                    <button class="btn btn-mini" msg-panel="weixun" type="button">
                        <span>公告</span>
                    </button>
                </div>
                <div id="nocbox" class="msg-panel active">
                    <div id="new_noc_panel" class="noc on">
                        <div id="new_noc_list" class="new_noc_list">
                            <div class="noc_item noc_item_1">
                                <div class="noc_item_title">
                                    <span>日常服务</span>
                                </div>
                                <div class="noc_item_data">
                                    <li class="" type_id="1" url="/general/notify/show/read_notify.php?NOTIFY_ID=15" sms_id="25762" id="noc_li_25762">
                                        <a class="noc-subitem" href="javascript:;">
                                            <p class="noc_item_info">
                                                <span class="noc_item_time pull-right ">1小时前</span>
                                                <span class="name">张飞</span>
                                            </p>
                                            <p class="noc_item_content">家中水管爆裂，请物业上门维修，谢谢！<br>类型：报修
                                            </p>
                                        </a>
                                    </li>
                                </div>
                            </div>
                        </div>
                        <div class="noc-nav-bar" style="display: block;">
                            <a class="viewbtn" id="ViewAllNoc" hidefocus="hidefocus" href="javascript:;">
                                <i class="glyphicon glyphicon-arrow-right"></i>
                                处理全部
                            </a>
                            <a class="viewbtn" id="ViewDetail" hidefocus="hidefocus" href="javascript:;">
                                <i class="glyphicon glyphicon-adjust"></i>
                                查看全部
                            </a>
                            <a id="check_remind_histroy" class="noc-right" hidefocus="hidefocus" href="javascript:;">
                                <i class="glyphicon glyphicon-list-alt"></i>
                                历史消息
                            </a>
                        </div>
                    </div>
                </div>
                <div id="weixun" class="msg-panel">
                    <ul id="recentlist" class="recentlist">
                        <li>
                            <a class="recentItem" fromid="126" href="javascript:;">
                            <span>物业公告：</span>
                                <div class="rec_info">
                                    <span class="rec_name">今天１２时停水一个小时！</span>
                                    <span class="rec_time">18:13</span>
                                    <p class="rec_content"></p>
                                </div>
                            </a>
                        </li>
                    </ul>
                    <div id="rec_tips" class="rec_tips" style="display: none;">暂无最近联系人</div>
                </div>
            </div>

        </div>
        <a class="east-handle" onclick="closeEastTab()" href="javascript:void(0)"  style="line-height: 50px;    text-align: center;">
            <i class="glyphicon glyphicon-arrow-right"></i>
        </a>
    </div>

    <!--bar-->
    <div class="bar" id="bar">
        <div id="barSwitcher">
            <span class="barTitle">导航菜单</span>
        <span class="marginLeft5">
            <input type="checkbox" data-toggle="switch" data-size="mini"  data-on-text="ON"
                   data-off-text="OFF" data-label-width="14" class="undis"  data-switch-value="true" name="menu_config" checked />
        </span>
        </div>
        <div id="bar_right">
        			<ul id="themes">
        				
        			</ul>
        </div>
    </div>

    <!--sideBar-->
    <div class="sideBar" id="sideBar">
        <div id="sideBarMain">
            <!--<div class="sideBarMain">-->
            <!--<div class="menuScroll scrollUp" style="display: block;"></div>-->
            <!--<ul id="firstMenu" class="firstMenu">-->
            <!--<li subMenuId="secondMenu-01">-->
            <!--<div class="firstMenuItem firstMenuItemHover">-->
            <!--<i class="icon"></i>-->
            <!--<span class="firstMenuTitle">个人事务</span>-->
            <!--</div>-->
            <!--<div id="secondMenu-01" class="secondPanel">-->
            <!--<h4>个人事务</h4>-->
            <!--<ul class="secondMenu clearfix">-->
            <!--<li>-->
            <!--<a href="javascript:void(0);" class="secondMenuItem" onclick="">消息管理</a>-->
            <!--</li>-->
            <!--<li class="expand">-->
            <!--<a href="javascript:void(0);" class="secondMenuItem" onclick="">工作计划</a>-->
            <!--<ul class="thirdMenu">-->
            <!--<li>-->
            <!--<a href="javascript:void(0);" class="thirdMenuItem" onclick="">工作计划查询</a>-->
            <!--</li>-->
            <!--</ul>-->
            <!--</li>-->
            <!--</ul>-->
            <!--</div>-->
            <!--</li>-->
            <!--</ul>-->
            <!--<div class="menuScroll scrollDown" style="display: block;"></div>-->
            <!--</div>-->
        </div>

        <div class="sideBarFooter" id="sideBarFooter">
            <ul class="footerLinks clearfix">
	                <li class="footerLink footerLinkIcon" style="width:100%;display: inline-block;">
	                    <a href="javascript:void(0);" class="icon glyphicon glyphicon-user" onclick="createTab('online_statistics','在线统计','/views/statisticsQuery/onlineStatistics.jsp')"  data-title="人员统计" >
	                    </a>
	                    <p class="online-count" id="online-count">在线人数:0</p>
	                </li>
	                <li class="footerLink footerLinkIcon" style="width:100%;display: inline-block;">
	                    <a href="javascript:void(0);" class="icon 	glyphicon glyphicon-usd" onclick="createTab('propertyfee_statistics','物业费统计','/views/statisticsQuery/propertyFeeStatistics.jsp')" data-title="物业费统计" ></a>
	               		<p class="online-count" id="propertyfee-count">物业统计:0</p>
	                </li>
                <li class="footerLink footerLinkIcon">
                    <a href="javascript: void(0)" onclick="createTab('tab-main-page','欢迎页','/welcome.html')"  class="icon glyphicon glyphicon-home" data-title="主工作台" ></a>
                </li>
                <li class="footerLink footerLinkIcon">
                    <a href="javascript:void(0);" class="icon glyphicon glyphicon-question-sign"  data-title="帮助" ></a>
                </li>
                <li class="footerLink">
                    <a href="javascript:void(0);" class="icon glyphicon glyphicon-chevron-left" data-title="图标模式" id="handMenuWord"></a>
                </li>
            </ul>
        </div>
    </div>

    <!--center-->
    <div class="center" id="center"></div>
</div>

<!-- 暂时放到底部 -->
<script>
var staticDomain='<%=WebUtil.getStaticRootPath()%>';
var localDomain='<%=WebUtil.getLocalRootPath()%>';
var menuObj = eval('(' + '<%=UserHolder.getResource()%>' + ')');
</script>
<jsp:include page="../views/layout/indexinc.jsp"></jsp:include>
<script src="/js/core/bootstrap/bootstrap-switch.min.js"></script>
<script src="/js/core/publicFunction.js"></script>
<script src="/js/core/tab.js"></script>
<script src="/js/core/plugins/layer/layer.js"></script>
<script src="/js/core/Main.js"></script>
</body>
</html>
